package com.foreknow.eldclient.service.impl;

import com.foreknow.eldclient.dao.DeliveryAddressMapper;
import com.foreknow.eldclient.po.DeliveryAddress;
import com.foreknow.eldclient.service.DeliveryAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeliveryAddressServiceImpl implements DeliveryAddressService {
    @Autowired
    private DeliveryAddressMapper DAM;
    @Override
    public List<DeliveryAddress> listDeliveryAddressByUserId(String userId) throws Exception {
        return DAM.listDeliveryAddressByUserId(userId);
    }

    @Override
    public int saveDeliveryAddress(DeliveryAddress deliveryAddress) throws Exception {
        return DAM.saveDeliveryAddress(deliveryAddress);
    }

    @Override
    public DeliveryAddress getDeliveryAddressById(Integer daId) throws Exception {
        return DAM.getDeliveryAddressById(daId);
    }

    @Override
    public int updateDeliveryAddress(DeliveryAddress deliveryAddress) throws Exception {
        return DAM.updateDeliveryAddress(deliveryAddress);
    }

    @Override
    public int removeDeliveryAddress(Integer daId) throws Exception {
        return DAM.removeDeliveryAddress(daId);
    }




}
